package behavioral.responsibility;

/**
 * @Description: 测试类
 * @Author: lxt
 * @CreateDate: 2019/11/1
 **/
public class ResponsibilityTest {
    public static void main(String[] args) {
        Handler manager = new Manager();
        Handler director = new Director();
        Handler leader = new Leader();

        manager.setNextHandler(director);
        director.setNextHandler(leader);

        System.out.println("出去吃肉处理结果：" + manager.check("出去吃肉",2));
        System.out.println("---------------------------------------");
        System.out.println("出去吃肉处理结果：" +  manager.check("年假",4));
        System.out.println("---------------------------------------");
        System.out.println("出去吃肉处理结果：" +  manager.check("禽流感需要隔离",7));

    }
}
